﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.TD
{
	public class OdAveFogOpt : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdAveFogOpt(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdAveFogOpt obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdAveFogOpt()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdAveFogOpt(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdAveFogOpt() : this(TD_DbPINVOKE.new_OdAveFogOpt(), true)
		{
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool m_bFogEnabled
		{
			get
			{
				bool result = TD_DbPINVOKE.OdAveFogOpt_m_bFogEnabled_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_bFogEnabled_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public bool m_bFogBackground
		{
			get
			{
				bool result = TD_DbPINVOKE.OdAveFogOpt_m_bFogBackground_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_bFogBackground_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public double m_dNearDistance
		{
			get
			{
				double result = TD_DbPINVOKE.OdAveFogOpt_m_dNearDistance_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_dNearDistance_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public double m_dFarDistance
		{
			get
			{
				double result = TD_DbPINVOKE.OdAveFogOpt_m_dFarDistance_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_dFarDistance_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public double m_dNearPercentage
		{
			get
			{
				double result = TD_DbPINVOKE.OdAveFogOpt_m_dNearPercentage_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_dNearPercentage_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public double m_dFarPercentage
		{
			get
			{
				double result = TD_DbPINVOKE.OdAveFogOpt_m_dFarPercentage_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_dFarPercentage_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		public uint m_Color
		{
			get
			{
				uint result = TD_DbPINVOKE.OdAveFogOpt_m_Color_get(this.swigCPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
			set
			{
				TD_DbPINVOKE.OdAveFogOpt_m_Color_set(this.swigCPtr, value);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
